<?php


namespace app\appa\model;


use think\Model;

class OrderModel extends Model
{
    protected $name = 'order';


    public function getPetImageAttr($imger)
    {
        return request()->domain() . $imger;
    }

    public function getPriceImageAttr($imger)
    {
        return request()->domain() . $imger;
    }

    public function getStatusAttr($val)
    {
        if ($val == 0) {
            $val = '待服务';
        }elseif ($val == 1){
            $val = '服务中';
        }elseif ($val == 2){
            $val = '已完成';
        }
        return $val;

    }

    public function getSwitchAttr($val)
    {
        if ($val == 0){
            $val = '未接单';
        }elseif ($val == 1){
            $val = '已接单';
        }
        return $val;
    }


    public function getPayTypeAttr($val)
    {
        if ($val == 0) {
            $val = '未支付';
        }elseif ($val == 1){
            $val = '微信支付';
        }elseif ($val == 2){
            $val = '支付宝支付';
        }elseif ($val == 3){
            $val = '银行卡支付';
        }
        return $val;

    }
}